package com.yugao.fintech.draper.admin.convert;

import com.yugao.fintech.draper.admin.entity.SysMenu;
import com.yugao.fintech.draper.core.model.TreeNode;
import com.yugao.fintech.draper.admin.param.MenuDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface MenuConvert {

	MenuConvert INSTANCE = Mappers.getMapper(MenuConvert.class);

	List<TreeNode<MenuDTO>> convert(List<TreeNode<SysMenu>> list);

	SysMenu convert(TreeNode treeNode);

	List<MenuDTO> convertList(List<SysMenu> sysMenuList);

}
